function showFrame ( obj ) {
	if ( draggedobj == null )
		document.getElementById(obj.id+"_frame").style.display = "block";
}

function hideFrame ( obj ) {
	if ( draggedobj == null )
		document.getElementById(obj.id+"_frame").style.display = "none";
}

function newFrame ( obj ) {
	var frame=document.createElement('div');
	frame.setAttribute('id', obj.id + '_frame');
	frame.setAttribute('class', 'frame_div');
	
	frame.appendChild(newMove(obj));
	frame.appendChild(newDel(obj));
	frame.appendChild(newResize(obj));
	frame.appendChild(newMenu(obj));
	
	obj.onmouseover = showFrame;
	
	return frame;
}

function addFrame ( obj ) {
	obj.appendChild(newFrame(obj));
	obj.onmouseout = function () {
		hideFrame(obj);
	}
	obj.onmouseover = function () {
		showFrame(obj);
	}
}
